<extend name="Public/layout" />

<block name="content">
<section class="wrapper site-min-height">
    <!-- page start-->
    <section class="panel">
        <header class="panel-heading">
            权限设置
            <span class="pull-right">
                <!--<a href="#add_auth" data-toggle="modal" class=" btn btn-success btn-xs">
                    <i class="fa fa-plus"></i> 新增
                </a>-->
                <a href="{:U('Admin/AdminAuth/add')}" class=" btn btn-success btn-xs">
                    <i class="fa fa-plus"></i> 新增
                </a>
                <button type="button" class="btn btn-warning btn-xs" onclick="window.location.reload()">
                    <i class="fa fa-refresh"></i> 刷新
                </button>
            </span>
        </header>
        <div class="panel-body">
            <div class="row">
                <div class="col-md-12">
                    <form class="form-inline" role="form" action="{:U('Admin/AdminAuth/index')}" method="get">
                        <div class="form-group">
                            <label class="sr-only" for="title">名称</label>
                            名称 <input name="title" value="{$Think.get.title}" type="text" id="title" class="form-control"  placeholder="请输入搜索名称">
                        </div>
                        <div class="form-group">
                            <label class="sr-only" for="url">URL</label>
                            URL <input name="url" value="{$Think.get.url}" type="text" id="url" class="form-control"  placeholder="请输入搜索URL">
                        </div>
                        <div class="form-group">
                            <label class="sr-only" for="url">状态</label>
                            状态
                            <select name="hide" class="form-control">
                                <option value="">请选择</option>
                                <option value="0">显示</option>
                                <option value="1">隐藏</option>
                            </select>
                        </div>
                        <button type="submit" class="btn btn-info">
                            <i class="fa fa-search"></i>
                            搜索
                        </button>
                    </form>
                </div>

            </div>
        </div>
        <hr style="margin:1px 0px; "/>
        <div class="panel-body">
            <div class="table-responsive" tabindex="1" style="overflow: hidden; outline: none;">
                <table class="table table-bordered table-hover">
                    <thead>
                    <tr>
                        <th>ID</th>
                        <th>权限名称</th>
                        <th>访问URL</th>
                        <th>权限描述</th>
                        <th>上级ID</th>
                        <th>ICO图标</th>
                        <th>排序(菜单)</th>
                        <th>权限状态</th>
                        <th>操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    <notempty name="list.list">
                        <volist name="list.list" id="vo">
                        <tr>
                            <td>{$vo.id}</td>
                            <td>{$vo.title}</td>
                            <td>{$vo.url}</td>
                            <td>{$vo.desc}</td>
                            <td>{$vo.pid}</td>
                            <td>{$vo.ico}</td>
                            <td>{$vo.sort}</td>
                            <td>
                                {$vo['hide']==1?'隐藏':'显示'}
                            </td>
                            <td>

                                <a href="{:U('Admin/AdminAuth/edit')}?id={$vo.id}" class="btn btn-info btn-xs">
                                    <i class="fa fa-pencil"></i> 编辑
                                </a>
                                <a href="javascript:;" ajax-msg="确认删除?" ajax-url="{:U('Admin/AdminAuth/del')}?id={$vo.id}" class="btn btn-danger btn-xs ajax-action-btn">
                                    <i class="fa fa-trash-o"></i> 删除
                                </a>
                            </td>
                        </tr>
                        </volist>
                        <else/>
                        <tr><td colspan="9" align="center">暂无数据</td></tr>
                    </notempty>
                    </tbody>
                </table>
            </div>
            <!--分页-->
            <div class="text-center">
                {$list.page}
            </div>
        </div>
    </section>
</section>
</block>

<block name="javascript">
    <script type="text/javascript" src="__ADMIN__/assets/fuelux/js/spinner.min.js"></script>
    <script>
        $('#spinner').spinner();
        //菜单高亮
        MenuHighlight('{:U("Admin/AdminAuth/index")}');
    </script>
</block>